!function(root,factory){"function"==typeof define&&define.amd?define(factory):"object"==typeof exports?module.exports=factory(require,exports,module):root.CountUp=factory()}(this,function(require,exports,module){return function(target,startVal,endVal,decimals,duration,options){var self=this;if(self.version=function(){return"1.9.3"},self.options={useEasing:!0,useGrouping:!0,separator:",",decimal:".",easingFn:function(t,b,c,d){return c*(1-Math.pow(2,-10*t/d))*1024/1023+b},formattingFn:function(num){var x,x1,x2,x3,i,len,neg=num<0;if(num=Math.abs(num).toFixed(self.decimals),x=(num+="").split("."),x1=x[0],x2=1self.endVal,self.frameVal=self.startVal,self.initialized=!0):(self.error="[CountUp] startVal ("+startVal+") or endVal ("+endVal+") is not a number",!1)):!(self.error="[CountUp] target is null or undefined"))},self.printValue=function(value){var result=self.options.formattingFn(value);"INPUT"===self.d.tagName?this.d.value=result:"text"===self.d.tagName||"tspan"===self.d.tagName?this.d.textContent=result:this.d.innerHTML=result},self.count=function(timestamp){self.startTime||(self.startTime=timestamp);var progress=(self.timestamp=timestamp)-self.startTime;self.remaining=self.duration-progress,self.options.useEasing?self.countDown?self.frameVal=self.startVal-self.options.easingFn(progress,0,self.startVal-self.endVal,self.duration):self.frameVal=self.options.easingFn(progress,self.startVal,self.endVal-self.startVal,self.duration):self.countDown?self.frameVal=self.startVal-(self.startVal-self.endVal)*(progress/self.duration):self.frameVal=self.startVal+(self.endVal-self.startVal)*(progress/self.duration),self.countDown?self.frameVal=self.frameValself.endVal?self.endVal:self.frameVal,self.frameVal=Math.round(self.frameVal*self.dec)/self.dec,self.printValue(self.frameVal),progressself.endVal,self.rAF=requestAnimationFrame(self.count))):self.error="[CountUp] update() - new endVal is not a number: "+newEndVal)},self.initialize()&&self.printValue(self.startVal)}});